<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet"
	type="text/css" />
<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>新增链接</title>
</head>
<body>
	<div class="pd-20">
		<form action="<%=path%>/backstage/u_link-add" method="post"
			class="form form-horizontal" id="form-u_link-add">
			<input type="hidden" id="id" name="id" value='${u_link.id}' />

			<div class="row cl">
				<label class="form-label col-2">名称：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.name}"
						style="width: 200px;" placeholder="" id="" name="name"
						datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">链接分组：</label>
				<div class="formControls col-2">
					<select name="group_id">
						<c:forEach items="${grouplist}" var="group">
							<option
								<c:if test="${u_link.group_id==group.id}">selected="selected"</c:if>
								value="${group.id}">${group.name}</option>
						</c:forEach>
					</select>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">网址：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.url}"
						style="width: 200px;" placeholder="" id="" name="url" datatype="*"
						nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">是否显示：</label>
				<div class="formControls col-2">
					<select name="is_effect">
						<option
							<c:if test="${u_link.is_effect==1}">selected="selected"</c:if>
							value="1">显示</option>
						<option
							<c:if test="${u_link.is_effect==0}">selected="selected"</c:if>
							value="0">隐藏</option>
					</select>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">排序：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.sort}"
						placeholder="" id="" name="sort" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<%-- <div class="row cl">
				<label class="form-label col-2">图片：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.img}"
						placeholder="" id="" name="img" datatype="*" nullmsg="不能为空">
				</div>
			</div> --%>
			<div class="row cl">
				<label class="form-label col-2">描述：</label>
				<div class="formControls col-2">
					<textarea name="description">${u_link.description}</textarea>
				</div>
			</div>
			<%-- <div class="row cl">
				<label class="form-label col-2">点击次数：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.count}"
						placeholder="" id="" name="count" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">显示次数：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.show_index}"
						placeholder="" id="" name="show_index" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.ext_1}"
						placeholder="" id="" name="ext_1" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.ext_2}"
						placeholder="" id="" name="ext_2" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.ext_3}"
						placeholder="" id="" name="ext_3" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.ext_4}"
						placeholder="" id="" name="ext_4" datatype="*" nullmsg="不能为空">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">：</label>
				<div class="formControls col-2">
					<input type="text" class="input-text" value="${u_link.ext_5}"
						placeholder="" id="" name="ext_5" datatype="*" nullmsg="不能为空">
				</div>
			</div>
 --%>
			<div class="row cl">
				<div class="col-10 col-offset-2">
					<button onClick="u_link_save_submit();"
						class="btn btn-primary radius" type="submit">
						<i class="Hui-iconfont">&#xe632;</i> 保存并提交
					</button>
					<button onClick="layer_close();" class="btn btn-default radius"
						type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
				</div>
			</div>
		</form>
	</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script>
	<script type="text/javascript"
		src="lib/Validform/5.3.2/Validform.min.js"></script>
	<script type="text/javascript"
		src="lib/webuploader/0.1.5/webuploader.min.js"></script>
	<script type="text/javascript"
		src="lib/ueditor/1.4.3/ueditor.config.js"></script>
	<script type="text/javascript"
		src="lib/ueditor/1.4.3/ueditor.all.min.js">
		
	</script>
	<script type="text/javascript"
		src="lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript">
		function u_link_save_submit() {
			$("#form-u_link-add").Validform({
				tiptype : 2,
				ajaxPost : true,
				callback : function(form) {
					var index = parent.layer.getFrameIndex(window.name);
					if (index) {//关闭弹出层
						parent.$('.btn-refresh').click();
						parent.layer.close(index);
					} else {//单独的页面
						location.href = "<%=path%>/backstage/u_link-list";
					}
				}
			});
		}
	</script>
</body>
</html>

